'use strict';

/** @type {import('sequelize-cli').Migration} */
module.exports = {
  async up (queryInterface, Sequelize) {
   await queryInterface.bulkInsert('admin', [{
      admin_name: '超级管理员',
      // 密码通过第三方模块md5进行加密，生成32位的加密字符串，类似的加密算法有sha1
      admin_password: require('md5')('admin123'),
      createdAt:new Date(),
      updatedAt: new Date()
    }], {});
  },

  async down (queryInterface, Sequelize) {
    await queryInterface.bulkDelete('admin', null, {});
  }
};
